const arr = [1, 3, 8, 6, 5, 5, 5, 10, 2];
const nArr = [...new Set(arr.sort((a, b) => a - b))]
// const nArr = new Set(arr);

console.log(arr);
console.log(nArr);

// let a = 'apple apple.js';
// console.log(a);